// 默认配置 导入vue-router的两个对象
import { createRouter, createWebHistory } from "vue-router";
// 导入组件路径
import HomeView from "../views/HomeView.vue";
import AboutView from "../views/AboutView.vue";
import ContentView from "../views/ContentView.vue";
import SongView from "../views/SongView.vue";
// 二级路由
import SkyView from "../views/天空之城.vue";
import YouView from "../views/为你唱首歌.vue";
import MonthView from "../views/李克勤.vue";
import HeyView from "../views/Heykong.vue";
// 详情页
import YView from "../views/月半小夜曲.vue";
import HView from "../views/红日.vue";
import SView from "../views/深深深.vue";
import HhView from "../views/护花使者.vue";
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 配置跳转路径
    {
      path: "/",
      name: "HomeView",
      component: HomeView,
    },
    {
      path: "/about",
      name: "AboutHomeView",
      component: AboutView,
    },
    {
      path: "/content",
      name: "ContentView",
      component: ContentView,
    },
    {
      path: "/song",
      name: "SongView",
      component: SongView,
      children: [
        {
          path: "/song/you",
          name: "you",
          component: YouView,
        },
        {
          path: "/song/month",
          name: "month",
          component: MonthView,
          children: [
            {
              path: "/song/month/:id",
              name: "yuebanxiaoyequ",
              component: YView,
            },
            {
              path: "/song/month/:id",
              name: "hongri",
              component: HView,
            },
            {
              path: "/song/month/:id",
              name: "shenshenshen",
              component: SView,
            },
            {
              path: "/song/month/:id",
              name: "huhuashizhe",
              component: HhView,
            },
          ],
        },
        {
          path: "/song/hey",
          name: "hey",
          component: HeyView,
        },
        {
          path: "/song/sky",
          name: "sky",
          component: SkyView,
        },
      ],
    },
  ],
});

export default router;

